package com.allenkerr.model;

import org.springframework.data.annotation.Id;

/**
 * Created by 小柯 on 17/6/22.
 */
public class User {

    @Id
//    private Integer id;
    private String id;

    private String username;

    private String password;

    private String realname;

    private Integer age;

    private Short sex;  //0女，1男

    private Double salary;

    private String address;

    public User(String id, String username, String password, String realname, Integer age, Short sex) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.realname = realname;
        this.age = age;
        this.sex = sex;
    }

    public User(String username, String password, String realname, Integer age, Short sex) {
        this.username = username;
        this.password = password;
        this.realname = realname;
        this.age = age;
        this.sex = sex;
    }

    public User(String username, String password, String realname) {
        this.username = username;
        this.password = password;
        this.realname = realname;
    }

    public User() {
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", realname='" + realname + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                ", salary=" + salary +
                ", address='" + address + '\'' +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Short getSex() {
        return sex;
    }

    public void setSex(Short sex) {
        this.sex = sex;
    }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
